<template>
	<view class="container">
		<image class="logo" src="/static/logo.png" mode="aspectFit"></image>
		<view class="title">卒中康复助手</view>
		<view class="subtitle">您的健康管理专家</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				timer: null
			}
		},
		onLoad() {
			this.timer = setTimeout(() => {
				// 检查是否首次启动
				const notFirstLaunch = uni.getStorageSync('notFirstLaunch');
				if (!notFirstLaunch) {
					// 如果是首次启动，进入引导页
					uni.redirectTo({
						url: '/pages/start/guide'
					});
				} else {
					// 不是首次启动，直接进入登录页
					uni.redirectTo({
						url: '/pages/login/login'
					});
				}
			}, 2000);
		},
		onUnload() {
			if (this.timer) {
				clearTimeout(this.timer);
			}
		}
	}
</script>

<style lang="scss">
	.container {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		height: 100vh;
		background-color: #ffffff;
		
		.logo {
			width: 200rpx;
			height: 200rpx;
			margin-bottom: 40rpx;
		}
		
		.title {
			font-size: 48rpx;
			font-weight: bold;
			color: #333333;
			margin-bottom: 20rpx;
		}
		
		.subtitle {
			font-size: 32rpx;
			color: #666666;
		}
	}
</style> 